import axios from 'axios'
let instance = new axios.create({
    baseURL:'/mock',
    timeout:5000
})
// 成功拦截器参数是回调函数 回调里面的值是路由配置
instance.interceptors.request.use((config)=>{
        return config
})
instance.interceptors.response.use(
    (res)=>{
        return res.data
    },
    (error)=>{
        return Promise.reject(error)
    }
)
export default instance;